package tothreedesignmodel.command;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author lzhphantom
 * @description
 * @date 创建于 21:26 2020/8/1
 * @modified
 */
@Data
@AllArgsConstructor
public class Invoker {
    private Command command;
    public void call(){
        System.out.println("call command");
        command.execute();
    }

    public static void main(String[] args) {
        Invoker invoker = new Invoker(new ConcreteCommand());
        invoker.call();
    }
}
